﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Prism.ViewModel;
using Microsoft.Practices.Prism.Events;
using Hockey.Shared;
using System.Windows.Documents;
using System.IO;
using System.Reflection;
using System.Windows;

namespace Hockey.UILayer.ViewModels
{
    /// <summary>
    /// ViewModel for Help form
    /// </summary>
    public class HelpFormVM: NotificationObject
    {
        private IEventAggregator _event;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="events"></param>
        public HelpFormVM(IEventAggregator events)
        {
            if (events == null)
                throw new ArgumentNullException("Events");
            _event = events;

            // init commands
            CloseCommand = new AutoDelegateCommand(() => { CloseForm(); });
        }

        public AutoDelegateCommand CloseCommand
        { get; set; }


        /// <summary>
        /// Notifies to close the form
        /// </summary>
        private void CloseForm()
        {
            _event.GetEvent<CloseForm>().Publish(this);
        }
    }
}
